

function SensorbitUnoBlocks(Blockly) {



    //继电器模块
    Blockly.Python.microbit_relay = function (block) {
        var dropdown_relay = this.getFieldValue('relay');
        var dropdown_relayStatus = this.getFieldValue('relayStatus');
        Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
        Blockly.Python.definitions_['import_Relay'] = 'from actuator import relay';
        var code = "relay.control(" + dropdown_relay + ", " + dropdown_relayStatus + ")\n";
        return code;
    }

    return Blockly;
}

module.exports = SensorbitUnoBlocks;

